﻿using Guna.UI2.WinForms;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace 健身房管理
{
    public partial class DashForm : Form
    {
        public string ww = "";
        public DashForm()
        {
            InitializeComponent();
            UserConsume uC_ = new UserConsume();
            addUserControl(uC_);
        }
        private void moveimagebox(object sender)   //移动式 边框
        {
            Guna2Button b =(Guna2Button) sender;
            imgSlide.Location = new Point(b.Location.X+34,b.Location.Y-25);
            imgSlide.SendToBack();          
        }
        private void addUserControl(UserControl uc)
        {
            panelContainer.Controls.Clear();  //清空显示页面
            uc.Dock = DockStyle.Fill;         //当前要添加的页面 填充满
            uc.BringToFront();
            panelContainer.Controls.Add(uc);
        }
        private void guna2Button1_CheckedChanged(object sender, EventArgs e)
        {           
            moveimagebox(sender);      
        }
        private void guna2Button1_Click(object sender, EventArgs e)
        {
            UserConsume uC_ = new UserConsume();
            uC_.toux = ww;
            addUserControl(uC_);
        }
        private void guna2Button6_Click(object sender, EventArgs e)
        {
            Application.Exit();   //退出项目
        }

        private void guna2Button5_Click(object sender, EventArgs e)
        {
            UserMessage uM_ = new UserMessage();
            addUserControl(uM_);
        }

        private void guna2Button2_Click(object sender, EventArgs e)
        {
            UserMember uMb_ = new UserMember();
            addUserControl(uMb_);
        }

       

        private void guna2Button4_Click(object sender, EventArgs e)
        {
            UserApparatus uA_ = new UserApparatus();
            addUserControl(uA_);
        }

        private void guna2Button3_Click(object sender, EventArgs e)
        {
            UserLost uL_ = new UserLost();
            addUserControl(uL_);
        }
    }
}
